<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            background-color: gray;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        nav{
            display: flex;
            justify-content: start;
            flex-direction: row;
            align-items: start;
        }
        .item{
            width: 100px;
        }

        a{  
            color: balck;
            position: relative;
            display: block;
            text-align: center;
            transform-origin: top;
            transform-style: preserve-3d;
            transition: all 0.5s ease-in-out;
            cursor: pointer;
            
        }
        a:hover{
            transform:  rotateX(90deg)
        }
        .ch{
            width: 80px;
            line-height: 50px;
            height: 50px;
            background-color: rgba(65, 156, 11, 0.877);
        }
        .en{
            position: absolute;
            width: 80px;
            line-height: 50px;
            height: 50px;
            background-color: blanchedalmond;
            transform-origin: top;
            transform: rotateX(-90deg);
        }
        p{
            margin: 0;
        }
    </style>
</head>
<body>
    <nav>
        <div class="item">
            <a>
                <p class="ch">首页</p>
                <p class="en">Home</p>
            </a>
        </div>
        <div class="item">
            <a>
                <p class="ch">博客</p>
                <p class="en">Blog</p>
            </a>
        </div>
        <div class="item">
            <a>
                <p class="ch">关于</p>
                <p class="en">About</p>
            </a>
        </div>
        <div class="item">
            <a>
                <p class="ch">退出</p>
                <p class="en">Exit</p>
            </a>
        </div>
    </nav>
</body>
</html>